﻿using baroIstatistik.Class;
using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace baroIstatistik
{
    public partial class kayitsil : System.Web.UI.Page
    {
        istatistikDataContext ist = new istatistikDataContext();
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {

          
            if (Request.QueryString["kid"]!=null)
            {
              
                    SqlConnection sqlcon = connection.baglanti;
                    SqlCommand sqlcmd = new SqlCommand("delete from basvuru where basvuruID=@basvuruID", sqlcon);
                    SqlCommand sqlcmd2 = new SqlCommand("delete from karar where basvuruID=@basvuruID", sqlcon);
                    sqlcmd.Parameters.AddWithValue("@basvuruID", Request.QueryString["kid"]);
                    sqlcmd2.Parameters.AddWithValue("@basvuruID", Request.QueryString["kid"]);
                    sqlcon.Open();
                    sqlcmd.ExecuteNonQuery();
                    sqlcmd2.ExecuteNonQuery();
                    sqlcon.Close();
                    Response.Redirect("kayit_listele_m.aspx");
           



            }

            }
            catch (Exception)
            {

               
            }

        }
    }
}